
#include <unistd.h>
#include <pthread.h>
#include "uac_jni.h"
#include "uac.h"

volatile int flag = 1;

#ifdef JNI_TEST

void *sip_recv_thread(void *param){
    JNIEnv *env = (JNIEnv *)AttachCurrentThread2JavaVM();
    flag = 1;
    while(flag){
        sleep(5);
        //SdkCallback(env, 0, 0, "Period Callback test one ENV");
    }

    DetachCurrentThreadFromJavaVM();
    return NULL;
}

int sip_init(){
    pthread_t tha;
    int reta = pthread_create(&tha, NULL, sip_recv_thread, 0);
    return 0;
}

int sip_exit(){
    flag = 0;
    return 0;
}

int sip_register(char* server, char* proxy, int port, char* usr, char* pwd)
{
    LOGI("%s", "BREAKPOINT here");
    return 0;
}
int sip_unregister(){return 0;}
int sip_invite(char* callee){return 0;}
int sip_answer(int callid){return 0;}
int sip_hangup(int callid){return 0;}


#endif